// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import Qt 4.7
//import com.nokia.meego 1.0      // MeeGo components
import "coreList"
import "coreList/Scrollable"

Rectangle
{
   width: 320; height: 640
    MouseArea {
        x: 0
        y: 0
        anchors.rightMargin: 0
        anchors.bottomMargin: 0
        anchors.leftMargin: 0
        anchors.topMargin: 0
        anchors.fill: parent
        Rectangle
        {
            id: rectangle1
            x: 0
            y: 0
            width: 320
            height: 480
            color: "#a8ea81"
            anchors.rightMargin: 0
            anchors.bottomMargin: 0
            anchors.leftMargin: 0
            anchors.topMargin: 0
            anchors.fill: parent

            Rectangle
            {
                id: rectangle2
                height: 32
                color: "#eff7ea"
                radius: 2
                anchors.top: parent.top
                anchors.topMargin: 1
                anchors.right: parent.right
                anchors.rightMargin: 109
                anchors.left: parent.left
                anchors.leftMargin: 1
                border.color: "#000000"

                TextEdit
                {
                    id: txt_search
                    height: 26
                    text: qsTr("abaci")
                    anchors.top: parent.top
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 5
                    anchors.right: parent.right
                    anchors.rightMargin: 19
                    selectedTextColor: "#954c4c"
                    selectionColor: "#976c6c"
                    smooth: false
                    cursorVisible: true
                    font.pixelSize: 22
                }
            }
            TextButton
            {
                signal searchWord(string msg)
                x: 215
                function updateTranslation(word_translation){   txt_translation.text = word_translation }

                id: btn_search
                y: 3
                width: 104
                height: 30
                text: "Search"
                border.color: "#000000"
                anchors.top: parent.top
                anchors.topMargin: 3
                backgroundImage: ""
                anchors.rightMargin: 1
                fontPixelSize: 22
                anchors.right: parent.right
                objectName: "btn_search"
                onClicked: btn_search.searchWord(txt_search.text)
            }

        }

    }

    Scrollable
    {
        x: 0
        y: 45
        width: txt_translation.width
        height: txt_translation.height
        color: "#a8ea81"
        anchors.rightMargin: 5
        anchors.bottomMargin: 7
        anchors.leftMargin: 0
        anchors.topMargin: 45
        contentWidth: txt_translation.width
        contentHeight: txt_translation.height
        flickableDirection: Flickable.HorizontalAndVerticalFlick
        hideScrollBarsWhenStopped: false

        anchors.fill: parent        

        Text {
            id: txt_translation
            x: 5
            y: 5
            text: ""
            font.pointSize: 22
            width: 297
            wrapMode: TextEdit.WordWrap
        }
    }

}
